1. Field of the Invention
The present invention generally relates to a communication apparatus, a relay apparatus, a communication system, and a method for communication, and particularly, to the communication through an ad hoc network comprising multiple communication apparatuses.
2. Description of the Related Art
A wireless LAN can provide faster wireless communication than a mobile telephone network does. Though the communication distance of each wireless station of the wireless LAN is limited, the wireless LAN covers a wide service area using multiple wireless stations connected to a backbone network. The backbone network is generally a wired wide-band network such as Ethernet (trademark) that can provide stable communication.
It is desired, however, that the backbone network be extended to an area where a wired network can not be provided easily or that the wireless LAN be quickly established in such an area. In such a case, a wireless backbone network may be employed for connection between the wireless stations of the wireless LAN.
A backbone network based on Ethernet (trademark) operates as a network of data link layer that does not involve an IP router.
When a packet is transmitted from a terminal, the packet is transferred via multiple nodes provided in the backbone network. Many techniques for controlling the route of packet transfer are proposed. The techniques include, for example: spanning tree method defined in IEEE 802.1; routing information protocol (RIP) and open shortest path first (OSPF) used for the routing in the Internet; dynamic source routing (DSR) and ad hoc on demand distance vector (AODV) used for an ad hoc network.
A data link layer network is used as a network that serves relatively small area such as an office or a home. If communication with an external network is needed, the data link layer network may be connected with the external network by a gateway such as an IP router.
When a terminal connected to the backbone network communicates with an external network, the terminal needs to obtain information such as the address of the gateway by any means.
The user of the terminal may input gateway address given by a network administrator manually. However, any change in the condition of the network such as the move of the terminal and/or communication troubles in the network may necessitate the user to re-input the gateway address, which is troublesome and may cause an error. Thus, many techniques are proposed that can automatically set the gateway address to the terminal to solve the above problem.
For example, S. Alexander et al., “DHCP Options and BOOTP Vendor Extensions”, RFC 2132, March 1997, proposes the enhancement of DHCP (Dynamic Host Configuration Protocol) in which a terminal is automatically informed of the IP address of a gateway.
T. Narten et al., “Neighbor Discovery for IP Version 6 (IPv6)”, RFC 2461, December 1998, proposes an IP router that automatically broadcasts its IP address to the network.
S. Knight et al., “Virtual Router Redundancy Protocol”, RFC 2338, April 1998, proposes a technique in which multiple routers share the same IP address as a group and are configured to exchange information with each other. A terminal can use any one of the routers as a gateway without changing the IP address set thereto.
However, the following problems remain unsolved. When the gateway address is set, the condition of routes between the terminal and the gateway is not taken into consideration.
If there is only a single gateway provided in the LAN, the terminal has no choice but select the single gateway. If multiple gateways exist in the LAN, the terminal can select one of them, but communication quality may considerably vary gateway by gateway.
Especially, if the components of the LAN are connected via wireless channels, frequency resource and wireless transmission speed are limited. Consequently, each route between the terminal and a gateway may differ in communication quality. The terminal may select a route the communication quality of which is not satisfactory.